package com.papers.juan.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.papers.common.core.mapper.BaseMapperPlus;
import com.papers.juan.domain.TJuanPaper;
import com.papers.juan.domain.bean.PaperDetailBean;
import com.papers.juan.domain.bo.TJuanPaperBo;
import com.papers.juan.domain.vo.TJuanPaperDetailVo;
import com.papers.juan.domain.vo.TJuanPaperVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 试卷Mapper接口
 *
 * @author papers
 * @date 2022-10-08
 */
public interface TJuanPaperMapper extends BaseMapperPlus<TJuanPaperMapper, TJuanPaper, TJuanPaperVo> {

    /**
     * 根据id获取试卷详情
     *
     * @param id 试卷id
     * @return 试卷详情
     */
    PaperDetailBean queryPaperDetailById(@Param("id") String id);

    /**
     * 获取试卷列表
     *
     * @param queryBean 查询条件
     * @param pageQuery 分页条件
     * @return 试卷列表
     */
    Page<TJuanPaperVo> queryPageList(@Param("queryBean") TJuanPaperBo queryBean,
                                     @Param("pageQuery") Page<TJuanPaperVo> pageQuery);

    /**
     * 根据组卷id获取试卷列表
     *
     * @param generateId 组卷id
     * @return 试卷列表
     */
    List<TJuanPaperDetailVo> queryPaperDetailListByGenerateId(@Param("generateId") String generateId);

}
